/*
 * RedPacketPushProcess.java
 * business
 *
 * Created by ChenTao on 2016/10/31.
 *
 * Copyright (c) 2016年 yidiandao. All rights reserved.
 */

package com.yidiandao.business.data.push.process;

import android.app.Activity;
import android.content.Context;
import android.content.Intent;

import com.yidiandao.business.data.bean.Message;
import com.yidiandao.business.data.push.AbsPushProcess;
import com.yidiandao.business.ui.assetabout.redpacket.RedPacketActivity;

/**
 * 红包推送处理
 */
public class RedPacketPushProcess extends AbsPushProcess {

    public RedPacketPushProcess(Context context, Message message, boolean isForeground) {
        super(context, message, isForeground);
    }

    @Override
    protected void addExtraDataToNotificationClickReceiverIntent(Intent intent) {
        // 跳转到红包页面不需要额外的数据
    }

    @Override
    public Intent getClickNotificationJumpActivityIntent() {
        return new Intent(mContext, RedPacketActivity.class);
    }

    @Override
    public void onDialogEnsureButtonClick(Message message) {
        RedPacketActivity.actionStart((Activity) mContext);
        tellServerMessageHasRead(message.getMsgId());
    }
}
